package com.itwenke.springbootdemo.properties;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;

@SpringBootApplication
public class PropertiesApplication {

    public PropertiesApplication(Environment environment) {
        String total = environment.getProperty("biz.total");
        String env = environment.getProperty("biz.env");
        String profile = environment.getProperty("biz.profile");

        System.out.println("total = " + total + ", env = " + env + ", profile = " + profile);
    }

    public static void main(String[] args) {
        SpringApplication.run(PropertiesApplication.class, args);
    }
}
